require
([
    "dijit/Menu",
    "dijit/MenuItem",
    "dijit/MenuBar",
    "dijit/PopupMenuBarItem",
    "dojo/domReady!"
], function(Menu, MenuItem, MenuBar, PopupMenuBarItem)
{
    var menu = new MenuBar({}, "mainMenu");
    
    var fileMenu = new Menu
    ({
        id: "fileMenu"
    });
    
    fileMenu.addChild
    (
        new MenuItem
        ({
            id: "new",
            label: "New"
        })
    );

    fileMenu.addChild
    (
        new MenuItem
        ({
            id: "save",
            label: "Save"
        })
    );
    
    menu.addChild
    (
        new PopupMenuBarItem
        ({
            id: "file",
            label: "File",
            popup: fileMenu
        })
    );

    menu.startup();
    fileMenu.startup();
});
